home *** CD-ROM | disk | FTP | other *** search
- aScreen <- Screen new: 16r40D20001
- aScreen open: 'Testing Menus:'
-
- aWindow <- Window new: 'Test the Menus:'
-
- aWindow setFlags: 16r1008 "ACTIVATE + CLOSE"
- aWindow setIDCMPFlags: 16r300 "MENUPICK + CLOSEWINDOW"
-
- aWindow openOnScreen: aScreen
-
- prj <- MenuItem new: #(1 'PROJECT' '' 0 0)
- load <- MenuItem new: #(2 'Load...' 'L' 0 'load')
- about <- MenuItem new: #(2 'About..' 'I' 0 'about')
- bar <- MenuItem new: #(2 -1 '' 0 0)
- quit <- MenuItem new: #(2 'Quit' 'Q' 0 'quit')
- end <- MenuItem new: #(0 '' '' 0 0)
-
- menuStrip <- NewMenu new: 6
-
- menuStrip setItem: 1 to: prj
- menuStrip setItem: 2 to: load
- menuStrip setItem: 3 to: about
- menuStrip setItem: 4 to: bar
- menuStrip setItem: 5 to: quit
- menuStrip setItem: 6 to: end
-
- menuStrip registerTo: aWindow
-
- menuStrip displayMenus
-
- rval <- String new
- rval <- aWindow handleIntuition
-
- ('User selected ', rval) print
-
- menuStrip hideMenus
-
- aWindow close
- aScreen close
-
- menuStrip dispose
-